<%@page contentType="text/html; charset=utf-8" language="java" errorPage="error.jsp"%>
<%@page import="com.greendragon.persistence.domain.User"%>
<%@taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%
String subtitle = "用户登入";
String scripts= "/static/js/Validform_min.js";
String styles= "/static/css/validation.css?v=0.0.1";
%>
<%@ include file="/include/header.jspf"%>

<script>

$(document).ready(function() {
	$("#regForm").Validform({
		btnSubmit:"#btn_sub",
		tiptype:function(msg,o,cssctl){
			if(o.obj){
				var objtip=o.obj.parent().parent().find(".Validform_checktip");
				cssctl(objtip,o.type);
				objtip.text(msg);
			}
		},
		tipSweep:false,
		postonce:true
	});
});

</script>

<body>
  <div id="header" class="wraper">
  </div>
  <div id="bodier" class="wraper">
	<form id="regForm" action="/account/login.do" method="post">
		<div class="aline">
			<label>用户名：</label>
			<div>
				<input type="text" name="name" datatype="e" nullmsg="请输入邮箱地址" errormsg="请输入邮箱地址"/>
			</div>
		<c:choose>
		   <c:when test="${null!=errors.name}">    
			   <div class="Validform_checktip Validform_wrong">
					<c:forEach items="${errors.name}" var="err">
						${err}
					</c:forEach>
				</div>
		   </c:when>
		   <c:otherwise>  
			<div class="Validform_checktip"></div>
		   </c:otherwise>
		</c:choose>
		</div>
		<div  class="aline">
			<label>密  码：</label>
			<div>
				<input type="password" name="password" datatype="*" nullmsg="请输入密码" errormsg="密码最多20个字符"/>
			</div>
		<c:choose>
		   <c:when test="${null!=errors.password}">    
			   <div class="Validform_checktip Validform_wrong">
					<c:forEach items="${errors.password}" var="err">
						${err}
					</c:forEach>
				</div>
		   </c:when>
		   <c:otherwise>  
			<div class="Validform_checktip"></div>
		   </c:otherwise>
		</c:choose>
		</div>
		<div  class="aline">
			<input id="btn_sub" type="submit" value="登入"/>  <a href="/account/RetakePassword.jsp" >忘记密码？</a>
		</div>
		<div class="aline">
			<input id="rememberMe" name="rememberMe" type="checkbox" value="true" /><label for="rememberMe">记住我</label>
		</div>
		<div class="aline">
			<a href="/account/signup.jsp" class="buttonB register">免费注册</a>
		</div>
	</form> 
   </div>
<jsp:include page="/include/footer.jspf"/>